package com.sample.web

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.groovyflow.spring.locator.BeanLocator;
import org.groovyflow.spring.locator.BeanLocatorImpl;
import org.springframework.showcase.coverc.service.RecipeManager;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.groovy.util.*

import org.groovyflow.spring.web.*

import com.sample.*


class RdrController{

	def before = ["doThisBefore"]

    def beanLocator = new BeanLocatorImpl();
    
     def doThisBefore(req, res){
    	println "Interceptor called in RdrController!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    }

	def tryit(req, res){
	    println "Using RdrController"
	    return new ModelAndView("redirect:editrecipe.htm?id=1").addObject("healthy");
	    //res.sendRedirect("editrecipe.htm?id=1");
	}
	
	

}